package com.easy.system.service;

import com.easy.system.util.Condition;
import com.easy.system.util.Pagination;
import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sunguangzhu
 * Date: 13-7-1
 * Time: 下午2:52
 * To change this template use File | Settings | File Templates.
 */
public interface BaseService<T> {
    public void save(T entity);

    public T get(Class<T> clazz, Long id);

    public void update(T entity);

    public void delete(Class<T> clazz, Long id);

    public int delete(Class<T> clazz, String ids);

    public List<T> find(Pagination pagination);

    public List<T> find(Condition condition);

    public List<T> find(Condition condition, Pagination pagination);

    public Long getTotal(Class<T> clazz);

    public Long getTotal(Condition condition);
}
